[deps]
musl
kernel-headers
gnu-getopt

[deps.host]
pkgconf

[main]
filesize=507123
sha512=3bf6db564359acafa738068980793129982318317bea69f21282d80f40dcb1e16938f8e2928e6cdcc4e77d89b2bc3f6c45aad7eb11ff84063b78e5f8e1907f9e

[mirrors]
http://ftp.netfilter.org/pub/iptables/iptables-1.4.14.tar.bz2

[build]
patch -p1 < "$K/iptables-1.4.14-musl-fixes.patch"
patch -p1 < "$K/iptables-1.4.14-nf-header.patch"
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
GNU_GETOPT="-Dgetopt=gnu_getopt -Dgetopt_long=gnu_getopt_long -Dgetopt_long_only=gnu_getopt_long_only"
CFLAGS="-D_GNU_SOURCE -DSTDC_HEADERS $GNU_GETOPT $optcflags" \
LDFLAGS="-lgnu_getopt $optldflags -static" \
 ./configure -C --prefix="$butch_prefix" $xconfflags --disable-shared
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
